const { Menu } = require('electron');

const template = [ // 菜单模板
  {
    label: 'elctron',
    submenu: [
        {
          label: '关于',
          onClick: () => {
            
          },
        },
        {
          label: '检查更新'
        }
    ]
  },
  {
    label: '文件',
    submenu: [
      {
        label: '新建文件'
      }
    ]
  }
];
var menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)